package initialize

import (
	"fmt"
	"github.com/robfig/cron/v3"
)

//定时任务
func InitTimerTask() {
	c := cron.New()
	//每天10点执行
	//spec1 := "* * 10 * * ?"
	//每隔一天执行一次算法自检
	spec1 := "@daily"
	c.AddFunc(spec1, TimerCheckAlgorithm)
}

func TimerCheckAlgorithm() {
	fmt.Println("定时任务")
}
